package com.design.composite.org;

// 员工类，实现了组件接口
class Employee implements Component {
    private String name;
    private double salary;

    public Employee(String name, double salary) {
        this.name = name;
        this.salary = salary;
    }

    @Override
    public void display() {
        System.out.println("Employee: " + name + ", Salary: " + salary);
    }

    @Override
    public double getSalary() {
        return salary;
    }
}